package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.IngredientInfoMapper;
import com.ruoyi.domain.IngredientInfo;
import com.ruoyi.service.IIngredientInfoService;

/**
 * IngredientInfoService业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-11
 */
@Service
public class IngredientInfoServiceImpl implements IIngredientInfoService 
{
    @Autowired
    private IngredientInfoMapper ingredientInfoMapper;

    /**
     * 查询IngredientInfo
     * 
     * @param ingredientId IngredientInfo主键
     * @return IngredientInfo
     */
    @Override
    public IngredientInfo selectIngredientInfoByIngredientId(Long ingredientId)
    {
        return ingredientInfoMapper.selectIngredientInfoByIngredientId(ingredientId);
    }

    /**
     * 查询IngredientInfo列表
     * 
     * @param ingredientInfo IngredientInfo
     * @return IngredientInfo
     */
    @Override
    public List<IngredientInfo> selectIngredientInfoList(IngredientInfo ingredientInfo)
    {
        return ingredientInfoMapper.selectIngredientInfoList(ingredientInfo);
    }

    /**
     * 新增IngredientInfo
     * 
     * @param ingredientInfo IngredientInfo
     * @return 结果
     */
    @Override
    public int insertIngredientInfo(IngredientInfo ingredientInfo)
    {
        return ingredientInfoMapper.insertIngredientInfo(ingredientInfo);
    }

    /**
     * 修改IngredientInfo
     * 
     * @param ingredientInfo IngredientInfo
     * @return 结果
     */
    @Override
    public int updateIngredientInfo(IngredientInfo ingredientInfo)
    {
        return ingredientInfoMapper.updateIngredientInfo(ingredientInfo);
    }

    /**
     * 批量删除IngredientInfo
     * 
     * @param ingredientIds 需要删除的IngredientInfo主键
     * @return 结果
     */
    @Override
    public int deleteIngredientInfoByIngredientIds(Long[] ingredientIds)
    {
        return ingredientInfoMapper.deleteIngredientInfoByIngredientIds(ingredientIds);
    }

    /**
     * 删除IngredientInfo信息
     * 
     * @param ingredientId IngredientInfo主键
     * @return 结果
     */
    @Override
    public int deleteIngredientInfoByIngredientId(Long ingredientId)
    {
        return ingredientInfoMapper.deleteIngredientInfoByIngredientId(ingredientId);
    }
}
